import java.sql.*;
public class MySql1 {
    public static void main(String[] args) {
        Connection con;
        Statement sql;
        ResultSet rs;
        con = GetDBConnection.connectionDB("world","root","");
        if(con==null) {
            return;
        }
        try{
            sql = con.createStatement();
            rs = sql.executeQuery("SELECT * FROM city where Population>8017530");
            while (rs.next()){
                int id=rs.getInt(1);
                String name = rs.getString(2);
                String counteyCode = rs.getString(3);
                String district = rs.getString(4);
                int  population =rs.getInt(5);
                System.out.printf("%d\t",id);
                System.out.printf("%s\t",name);
                System.out.printf("%s\t",counteyCode);
                System.out.printf("%s\t",district);
                System.out.printf("%d\n",population);
            }
            con.close();
        }catch (SQLException e){
            System.out.println(e);
        }

    }
}